Optimal. Leaf size=53 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{(a+b)^{3/2}}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {3751, 482, 385,
212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{(a+b)^{3/2}}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 385
Rule 482
Rule 3751
Rubi steps
\begin {align*} \int \frac {\tanh ^2(x)}{\left (a+b \tanh ^2(x)\right )^{3/2}} \, dx &=\text {Subst}\left (\int \frac {x^2}{\left (1-x^2\right ) \left (a+b x^2\right )^{3/2}} \, dx,x,\tanh (x)\right )\\ &=-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )}{a+b}\\ &=-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}+\frac {\text {Subst}\left (\int \frac {1}{1-(a+b) x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{a+b}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{(a+b)^{3/2}}-\frac {\tanh (x)}{(a+b) \sqrt {a+b \tanh ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(112\) vs. \(2(53)=106\).
time = 1.29, size = 112, normalized size = 2.11 \begin {gather*} \frac {\tanh (x) \left (\tanh ^{-1}\left (\frac {\sqrt {\frac {(a+b) \tanh ^2(x)}{a}}}{\sqrt {1+\frac {b \tanh ^2(x)}{a}}}\right ) \left (b+a \coth ^2(x)\right ) \sqrt {\frac {(a+b) \tanh ^2(x)}{a}}-(a+b) \sqrt {1+\frac {b \tanh ^2(x)}{a}}\right )}{(a+b)^2 \sqrt {a+b \tanh ^2(x)} \sqrt {1+\frac {b \tanh ^2(x)}{a}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(288\) vs.
\(2(45)=90\).
time = 0.65, size = 289, normalized size = 5.45
method | result | size |
derivativedivides | \(-\frac {\tanh \left (x \right )}{a \sqrt {a +b \left (\tanh ^{2}\left (x \right )\right )}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}+\frac {1}{2 \left (a +b \right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}+\frac {b \left (2 b \left (1+\tanh \left (x \right )\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(289\) |
default | \(-\frac {\tanh \left (x \right )}{a \sqrt {a +b \left (\tanh ^{2}\left (x \right )\right )}}-\frac {1}{2 \left (a +b \right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {b \left (2 b \left (\tanh \left (x \right )-1\right )+2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}+\frac {\ln \left (\frac {2 a +2 b +2 b \left (\tanh \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\tanh \left (x \right )-1\right )^{2}+2 b \left (\tanh \left (x \right )-1\right )+a +b}}{\tanh \left (x \right )-1}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}+\frac {1}{2 \left (a +b \right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}+\frac {b \left (2 b \left (1+\tanh \left (x \right )\right )-2 b \right )}{\left (a +b \right ) \left (4 b \left (a +b \right )-4 b^{2}\right ) \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}-\frac {\ln \left (\frac {2 a +2 b -2 b \left (1+\tanh \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\tanh \left (x \right )\right )^{2}-2 b \left (1+\tanh \left (x \right )\right )+a +b}}{1+\tanh \left (x \right )}\right )}{2 \left (a +b \right )^{\frac {3}{2}}}\) | \(289\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 861 vs.
\(2 (45) = 90\).
time = 0.46, size = 2281, normalized size = 43.04 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tanh ^{2}{\left (x \right )}}{\left (a + b \tanh ^{2}{\left (x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 319 vs.
\(2 (45) = 90\).
time = 0.55, size = 319, normalized size = 6.02 \begin {gather*} -\frac {\frac {{\left (a^{2} b + a b^{2}\right )} e^{\left (2 \, x\right )}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}} - \frac {a^{2} b + a b^{2}}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}}{\sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}} - \frac {\sqrt {a + b} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {\sqrt {a + b} \log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right )}{2 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} - \frac {\log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, {\left (a + b\right )}^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\mathrm {tanh}\left (x\right )}^2}{{\left (b\,{\mathrm {tanh}\left (x\right )}^2+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________